#ifndef IMAGEMANAGER_H
#define IMAGEMANAGER_H

#include <QMap>
#include <QString>
#include <QStringList>
#include <QDomDocument>
#include "aed_image.h"


class ImageManager
{
    QMap<QString,AED_Image*> m_images;
public:
    ImageManager();
    ~ImageManager();

    AED_Image *LoadImageK(const QString &path);
    AED_Image* LoadImageK(const QString &idpath, const QString &realpath);
    AED_Image* GetImage(const QString &path);
    AED_Image* GetImage(int pos);
    void EraseImage(const QString &name);
    QStringList GetImageNames();
    QStringList GetImagePaths();
    int GetCount(){return m_images.size();}
    void Save(QTextStream &file);
    void Save(QDomDocument &doc, QDomElement &header, const QString &scene_path);
    void UpdatePaths(const QString &path);

    bool Load(QDomElement &header, QString &scene_path);
    void Clean();
};

#endif // IMAGEMANAGER_H
